#include <stdio.h>

int main(int argc, char **argv)
{
	int c1, c2, time, point;
	int hour, min, sec;

	scanf("%d%d", &c1, &c2);
	
	point = (c2-c1) % 100;
	time = c2 - c1;

	if(point >= 50)
		time += (100 - point);
	else
		time -= point;

	time /= 100.0;
	
	hour = time / 3600;
	time -= 3600 * hour;

	min = time / 60;
	time -= 60 * min;

	sec = time;
	printf("%02d:%02d:%02d\n", hour, min, sec);
}